package com.kgc.chen;

import java.util.Arrays;
import java.util.Scanner;

public class fangFa {
    public static void main(String[] args) {
        int[] scose = {1, 3, 9, 7, 6};
        int[] scoses = new int[5];
        Scanner input = new Scanner(System.in);

        for (int i = 0; i < scoses.length; i++) {
            scoses[i] = input.nextInt();
        }
        System.out.println(Arrays.equals(scose,scoses));

        }
    }
//}